from django.db import models

# Create your models here.

class Book(models.Model):

    id = models.AutoField(primary_key=True) #自增、主键
    title = models.CharField(max_length=64,null=True) # null=True可为空
    state = models.BooleanField(default=True)  #default=True默认值
    pub_date = models.DateField(null=True)
    price = models.DecimalField(max_digits=8,decimal_places=2,null=True)
    publish = models.CharField(max_length=32)

